<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>添加配送方式</title>
		<link type="text/css" rel="stylesheet" href="${path }/js/easyui/themes/default/easyui.css">
		<link type="text/css" rel="stylesheet" href="${path }/js/easyui/themes/icon.css">
		<script type="text/javascript" src="${path }/js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="${path }/js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript">
			var path="${path}";
		</script>
		<script type="text/javascript" src="${path }/js/form/jquery.form.js"></script>
		<script type="text/javascript">
		
			$(document).ready(function() { 
					var options = {
						beforeSubmit: checkForm,
						dataType : 'json',
						success:addAppBack
					};
					
				 	$('#addForm').ajaxForm(options); 
				    
				    
			}); 
			
			
			
			function checkForm(){
				//return false;
			}
			function addAppBack(json){
				if(json.result=="Success"){
					alert("保存成功!");
					refleshOpener();
				}
			}
		
			function refleshOpener(){
				ownerDialog.opener.refresh();
				ownerDialog.close();
			}
			
			
		</script>
	</head>
	<body>
		<form action="${path}/manager/shipping/save" method="post" id="addForm" name="addForm">
			<div title="配送信息" class="easyui-panel" style="width:500px;height:300px;padding:10px;background:#fafafa;">
				<table >
					<tr>
						<td>
							配送名称:
						</td>
						<td>
							<input type="text" name="shippingName" size="40" value="${shipping.shippingName }" readonly><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							基本费用:
						</td>
						<td>
							<input type="text" name="shippingBasePrice" size="40" value="${shipping.shippingBasePrice }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							每加一件费用:
						</td>
						<td>
							<input type="text" name="shippingAddPerPrice" size="40" value="${shipping.shippingAddPerPrice }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							配送地:
						</td>
						<td>
							<input type="text" name="address" value="${mshipping.address }" size="40" ><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							描述:
						</td>
						<td>
							<textarea rows="5" cols="30" name="shippingDesc">${shipping.shippingDesc }</textarea>
						</td>
					</tr>
					
				</table>
			</div>
			
			<div>
				<table>
					<tr>
						<td>
							<input type="hidden" name="shippingId" value="${shipping.shippingId }">
							<input type="hidden" name="id" value="${mshipping.id }">
							<input type="submit" value="完成">
						</td>
					</tr>
				</table>
			</div>
			
		</form>
	</body>
</html>